package cate.common.table.activity.dungeonup;

import cate.common.table.ESheet;

import java.util.List;
import java.util.stream.Collectors;

public class DUConfigSheet extends ESheet<DUConfigRow> {
    @Override
    public String getSheetName() {
        return "魔塔配置";
    }

    public List<DUConfigRow> getListByConfigId(int configTid) {
        return list.stream().filter(row -> row.configID == configTid).collect(Collectors.toList());
    }

    public DUConfigRow getRowByFloorConfigId(int floor, int configTid) {
        for (DUConfigRow row : list) {
            if (row.floor == floor && row.configID == configTid) {
                return row;
            }
        }
        return null;
    }
}
